#ifndef CHARACTERITEM_H
#define CHARACTERITEM_H



#include "models_global.h"
#include "ItemRoot.h"
#include "CampaignItem.h"



#include <QPointer>



class MODELSSHARED_EXPORT CharacterItem : public ItemRoot
{
    Q_OBJECT

public:

    enum DataType
    {
        DataType_FIRST = ItemRoot::DataType_LAST + 1,

        CampaignData = DataType_FIRST,

        DataType_LAST = CampaignData
    };

    CharacterItem(QObject *parent = 0);
    CharacterItem(const QString& name, QObject *parent = 0);

    virtual ~CharacterItem();

    virtual int fieldCount() const;
    virtual QString fieldName(const int &data_type) const;
    virtual int field(const QString &field_name) const;


    void setCampaign(CampaignItem* campaign);
    CampaignItem* campaign() const;

    QString campaignFile() const;
    QString campaignName() const;


protected:

    virtual void setCustomData(const int &data_type, const QVariant &value);
    virtual QVariant customData(const int &data_type, int role = Qt::DisplayRole) const;

    QPointer<CampaignItem> m_campaignItem;
    QString m_campaignFile;


};



#endif // CHARACTERITEM_H


